{extend name="common:base"/}
{block name="body"}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-12">
        <h2>用户</h2>
    </div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-md-4">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>个人资料</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                        <a class="close-link"><i class="fa fa-times"></i></a>
                    </div>
                </div>
                <div class="ibox-content no-padding border-left-right">
                    <div class="m-t-md text-align-center">
                        <a href="#" data-toggle="modal" data-target="#avatar-modal">
                            <img alt="image" class="img-circle" src="{:portrait()}">
                        </a>
                    </div>
                    <div class="ibox-content profile-content">
                        <h4><strong class="text-align-center">{:\\think\\Session::get('user_auth.username')}</strong></h4>
                        <p><i class="fa fa-map-marker"></i> 测试文字</p>
                        <h5>
                            测试文字
                        </h5>
                        <p>
                            测试文字
                        </p>
                        <div class="row m-t-lg">
                        </div>
                        <div class="user-button">
                            <div class="row">
                                <div class="col-md-6">
                                    <button type="button" class="btn btn-primary btn-sm btn-block"><i class="fa fa-envelope"></i> 发送消息</button>
                                </div>
                                <div class="col-md-6">
                                    <button type="button" class="btn btn-default btn-sm btn-block"><i class="fa fa-coffee"></i> 赞助</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Cropping modal -->
<div class="modal inmodal fade" id="avatar-modal" aria-="true" aria-labelledby="avatar-modal-label" role="dialog" tabindex="-1">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form class="avatar-form" action="{:\\think\\Url::build('headPortrait')}" enctype="multipart/form-data" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <p class="modal-title" id="avatar-modal-label">改变头像</p>
                </div>
                <div class="modal-body">
                    <div class="avatar-body">
                        <!-- Upload image and data -->
                        <div class="avatar-upload">
                            <input type="hidden" class="avatar-src" name="avatar_src">
                            <input type="hidden" class="avatar-data" name="avatar_data">
                            <a href="#" class='file_static7'>
                                <i class="fa fa-upload"></i>&nbsp;&nbsp;<span class="bold">请选择图片</span>
                                <input type="file" class="avatar-input" id="avatarInput"  name="avatar_file">
                            </a>
                        </div>
                        <!-- Crop and preview -->
                        <div class="row">
                            <div class="col-md-9">
                                <div class="avatar-wrapper">
                                    <img id="image">
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="avatar-preview preview-lg"></div>
                                <div class="avatar-preview preview-md"></div>
                                <div class="avatar-preview preview-sm"></div>
                            </div>
                        </div>

                        <div class="row avatar-btns">
                            <div class="col-md-10">
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="-90" title="逆时针90&deg;旋转"><span class="fa fa-rotate-left"></span></button>
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="90" title="顺时针90&deg;旋转"><span class="fa fa-rotate-right"></span></button>
                                </div>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="zoom" data-option="0.1"><span class="fa fa-search-plus"></span></button>
                                    <button type="button" class="btn btn-primary" data-method="zoom" data-option="-0.1"><span class="fa fa-search-minus"></span></button>
                                </div>

                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="setDragMode" data-option="move"><span class="fa fa-arrows"></span></button>
                                </div>

                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="-15">-15&deg;</button>
                                </div>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="-30">-30&deg;</button>
                                </div>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="-45">-45&deg;</button>
                                </div>

                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="15">15&deg;</button>
                                </div>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="30">30&deg;</button>
                                </div>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="rotate" data-option="45">45&deg;</button>
                                </div>
                                <div class="btn-group">
                                    <button type="button" class="btn btn-primary" data-method="getCroppedCanvas" data-option="45">预览</button>
                                </div>
                            </div>
                            <div class="col-md-2">
                                <button type="submit" disabled class="btn btn-primary btn-block avatar-save">保存</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div><!-- /.modal -->

<!-- Show the cropped image in modal -->
<div class="modal fade docs-cropped" id="getCroppedCanvasModal" aria-hidden="true" aria-labelledby="getCroppedCanvasTitle" role="dialog" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="getCroppedCanvasTitle">预览</h4>
            </div>
            <div class="modal-body text-align-center"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a class="btn btn-primary" id="download" href="javascript:void(0);" download="cropped.jpg">保存</a>
            </div>
        </div>
    </div>
</div><!-- /.modal -->
{/block}
{block name="css"}
<link href="__CSS__/plugins/cropper/cropper.min.css" rel="stylesheet">
<link href="__CSS__/plugins/cropper/main.css" rel="stylesheet">
{/block}
{block name="script"}
<script type="text/javascript" src="__JS__/plugins/cropper/cropper.min.js"></script>
<script type="text/javascript" src="__JS__/plugins/cropper/main.js"></script>

{/block}